<!DOCTYPE html >
<html>
<head>
<meta name="Generator" content="tpshop" />
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>地址列表-{$tpshop_config['shop_info_store_title']}</title>
<meta http-equiv="keywords" content="{$tpshop_config['shop_info_store_keyword']}" />
<meta name="description" content="{$tpshop_config['shop_info_store_desc']}" />
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<link rel="stylesheet" href="__STATIC__/css/public.css">
<link rel="stylesheet" href="__STATIC__/css/user.css">
<link rel="stylesheet" href="__STATIC__/css/cellar/mui.min.css">
<link rel="stylesheet" href="__STATIC__/css/cellar/iconfont.css" />
<link rel="stylesheet" href="__STATIC__/css/cellar/public_fontsize.css" />
<script type="text/javascript" src="__STATIC__/js/jquery.js"></script>
<script src="__PUBLIC__/js/global.js"></script>
<script src="__PUBLIC__/js/mobile_common.js"></script>
</head>
<body>
      <header>
      <div class="tab_nav">
        <div class="header">
          <div class="h-left"><a class="sb-back" href="javascript:history.back(-1)" title="返回"></a></div>
          <div class="h-mid">地址管理</div>
          <div class="h-right">
            <aside class="top_bar">
              <div onClick="show_menu();$('#close_btn').addClass('hid');" id="show_more"><a href="javascript:;"></a> </div>
            </aside>
          </div>
        </div>
      </div>
      </header>
<include file="public/menu"/>
									
<div id="tbh5v0">    
  <volist name="lists" id="list">  
        <div class="address_add">                
             <if condition="$Request.param.source eq 'cart2'">
                  <div class="<if condition="$list[is_default] eq 1">Default</if>">  
                    <a href="{:U('/Mobile/Cart/cart2',array('address_id'=>$list['address_id']))}">
                    	<h2 class="fs_xl">
                        <if condition="$list[is_default] eq 1">
                       		<img src="__STATIC__/images/right.png">
                       		<span class="fs_m">默认地址</span>
                        </if>
                      </h2>
                        <dl>
                            <dt class="cls"><span>{$list.consignee}</span><em>电话:{$list.mobile}</em></dt>
                            <dd>{$region_list[$list['province']]['name']}，{$region_list[$list['city']]['name']}，{$region_list[$list['district']]['name']}，{$list.address}</dd>
                        </dl>
                    </a>
                  </div>  
             <else/>
                  <div style="cursor: pointer;" class="address-info <if condition="$list[address_id] eq $indiana_address_id">Default</if>" address_id="{$list['address_id']}">
	                    <h2 class="fs_xl">
	                    	<if condition="$list[address_id] eq $indiana_address_id">
                       		<img src="__STATIC__/images/right.png">
                        </if>
	                    </h2>
	                    <dl>
	                        <dt><span>{$list.consignee}</span><em>电话:{$list.mobile}</em></dt>
	                        <dd>{$region_list[$list['province']]['name']}，{$region_list[$list['city']]['name']}，{$region_list[$list['district']]['name']}，{$list.address}</dd>
	                    </dl>
	                </div>  
             </if>                           
             <a class="dz_bj mui-icon iconfont icon-bi fs_xl" href="{:U('/Mobile/User/edit_address',array('id'=>$list[address_id],'source'=>$Request.param.source))}"><span class="fs_s">编辑</span></a>
        		 <a class="dz_sc mui-icon iconfont icon-iconfont05 fs_xl"><span class="fs_s" onClick="if (confirm('你确认要删除该收货地址吗？'))location.href='{:U('/Mobile/User/del_address',array('id'=>$list.address_id))}'">删除</span></a>
        </div>        
       		 
   </volist> 
</div>

<div style=" width:100%; height:50px;"></div>
<div class="list_footer">
	<a href="{:U('/Mobile/User/add_address',array('source'=>$Request.param.source))}">添加新地址</a>
</div>

<script>
function goTop(){
	$('html,body').animate({'scrollTop':0},600);
}
$(function(){
	$(".address-info").on("click",function(){
		var address_id = $(this).attr('address_id');
		var id = {$_GET['id']};
		$.post("{:U('/Mobile/User/indiana_address')}",{'address_id':address_id,'id':id},function(data){
			if(data.status == 1){
				window.history.go(-1);
			}
			else{
				alert(data.msg);
			}
		},'json');
	})
})
</script>
<a href="javascript:goTop();" class="gotop"><img src="__STATIC__/images/topup.png"></a>		
</div>

 
</body>
</html>